package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EmpFamilyAddDTO;
import org.jsola.hr.dto.EmpFamilyUpdateDTO;
import org.jsola.hr.query.EmpFamilyQuery;
import org.jsola.hr.vo.EmpFamilyListVO;
import org.jsola.hr.vo.EmpFamilyVO;

import java.util.List;

/**
 * 员工家庭成员
 *
 * @author zhr
 */
@Api(tags = "hr-员工家庭成员")
public interface IEmpFamilyControllerAPI {

    /**
     * 新增员工家庭成员
     * @param empFamilyAddDTO 员工家庭成员新增实体
     * @return 员工家庭成员展示对象
     */
    @ApiOperation(value = "新增员工家庭成员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empFamilyAddDTO", dataType = "EmpFamilyAddDTO", value = "新增员工家庭成员", paramType = "body")
    })
    Result<EmpFamilyVO> save(EmpFamilyAddDTO empFamilyAddDTO);


    /**
     * 修改员工家庭成员
     * @param empFamilyUpdateDTO 员工家庭成员
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工家庭成员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empFamilyUpdateDTO", dataType = "EmpFamilyUpdateDTO", value = "修改员工家庭成员", paramType = "body")
    })
    Result<Integer> update(EmpFamilyUpdateDTO empFamilyUpdateDTO);




    /**
     * 删除单个员工家庭成员，彻底删除
     * @param empFamilyId 员工家庭成员id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工家庭成员，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empFamilyId", dataType = "String", value = "员工家庭成员id", paramType = "path")
    })
    Result<Integer> delete(String empFamilyId);


    /**
     * 批量删除员工家庭成员，彻底删除
     * @param empFamilyIds 员工家庭成员id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工家庭成员，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empFamilyIds", dataType = "String[]", value = "员工家庭成员id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empFamilyIds);


    /**
     * 根据员工家庭成员id查询员工家庭成员详情
     * @param empFamilyId 员工家庭成员id
     * @return 员工家庭成员详情
     */
    @ApiOperation(value="根据员工家庭成员id查询员工家庭成员详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empFamilyId", dataType = "String", value = "员工家庭成员id", paramType = "path")
    })
    Result<EmpFamilyVO> findById(String empFamilyId);


    /**
     * 查询员工家庭成员
     * @param empFamilyQuery 员工家庭成员查询参数
     * @return page
     */
    @ApiOperation(value="查询员工家庭成员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empFamilyQuery", dataType = "EmpFamilyQuery", value = "员工家庭成员查询参数", paramType = "query")
    })
    Result<List<EmpFamilyListVO>> listAll(EmpFamilyQuery empFamilyQuery);


     /**
     * 分页查询员工家庭成员
     * @param empFamilyQuery 员工家庭成员查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工家庭成员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empFamilyQuery", dataType = "EmpFamilyQuery", value = "员工家庭成员查询参数", paramType = "query")
    })
    Result<Page<EmpFamilyListVO>> page(EmpFamilyQuery empFamilyQuery);


}

